package ModelLayer;

public class Product {
	private String name;
	private double purchasePrice;
	private double salesPrice;
	private double rentPrice;
	private String countryOfOrigin;
	private int currentStock;
	
	public Product(String name, double pPrice, double sPrice, double rPrice, String country)
	{
		this.name = name;
		purchasePrice = pPrice;
		salesPrice = sPrice;
		rentPrice = rPrice;
		countryOfOrigin = country;
		currentStock = 0;
	}

    public boolean increaseStock(int increment)
    {
        if(increment>0)
        {
            currentStock+=increment;
            return true;
        }
        else
        {
            return false;
        }
    }
    
    public boolean decreaseStock(int decrement)
    {
        if(decrement>0)
        {
            currentStock-=decrement;
            return true;
        }
        else
        {
            return false;
        }
    }
    
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getPurchasePrice() {
		return purchasePrice;
	}

	public void setPurchasePrice(double purchasePrice) {
		this.purchasePrice = purchasePrice;
	}

	public double getSalesPrice() {
		return salesPrice;
	}

	public void setSalesPrice(double salesPrice) {
		this.salesPrice = salesPrice;
	}

	public double getRentPrice() {
		return rentPrice;
	}

	public void setRentPrice(double rentPrice) {
		this.rentPrice = rentPrice;
	}

	public String getCountryOfOrigin() {
		return countryOfOrigin;
	}

	public void setCountryOfOrigin(String countryOfOrigin) {
		this.countryOfOrigin = countryOfOrigin;
	}

	public int getCurrentStock() {
		return currentStock;
	}

	public void setCurrentStock(int currentStock) {
		this.currentStock = currentStock;
	}
}
